package main.java.indi.zyj.hot100;

import main.java.indi.zyj.hot100.base.TreeNode;

public class _33_invertTree {
    public TreeNode invertTree(TreeNode root) {

        if (root == null) {
            return null;
        }

        TreeNode temp;
        temp = root.left;
        root.left = root.right;
        root.right = temp;

        invertTree(root.left);
        invertTree(root.right);

        return root;
    }
}
